package com.yunti.yntk.db;

import androidx.room.Dao;
import androidx.room.Entity;
import androidx.room.Insert;
import androidx.room.Query;
import com.yunti.yntk.db.po.ExamStu;

import java.util.List;

@Dao
@Entity
public interface ExamStuDao {
    @Query("SELECT * FROM exam_stu")
    List<ExamStu> getAll();

    @Insert
    void insertAll(ExamStu... yns);

    @Insert
    void insertAll(List<ExamStu> yns);

    @Query("DELETE FROM exam_stu")
    void deleteAll();


    @Query("SELECT * FROM exam_stu where id = :id")
    ExamStu getYnById(Integer id);

    @Query("SELECT * FROM exam_stu where idCard = :id")
    ExamStu queryStuByCardId(String id);
}
